package com.junzhiit.nengji.cms.web.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.junzhiit.nengji.cms.service.ChainSkuService;
import com.junzhiit.nengji.cms.web.vo.ChainSkuAddVO;
import com.junzhiit.nengji.cms.web.vo.ResultVO;

import io.swagger.annotations.ApiOperation;

@RestController
@RequestMapping("/chain/sku")
public class ChainSkuController extends BaseController{
	
	@Autowired
	private ChainSkuService chainSkuService; 
	
	
	@ApiOperation(value = "获取sku")
	@RequestMapping(value="/all",method=RequestMethod.GET)
	public ResultVO getAll(String sessionId){
		return chainSkuService.getAll(sessionId);
	}
	
	@ApiOperation(value = "增加SKU名称")
	@RequestMapping(method = RequestMethod.POST)
	public ResultVO add(ChainSkuAddVO chainSkuAddVO) {
		return chainSkuService.add(chainSkuAddVO);
	}
	
	
	
}
